<template>
  <Modal title="新增评分项"
         id="user-management-add-update"
         width="600px"
         :mask-closable="false"
         v-model="visible"
         okText="保存">

    <Form class="clearfix form-custom"
          ref="formCustom"
          :model="dataForm"
          :label-width="80">
      <FormItem label="评分项"
                prop="loginName">
        <Input v-model="dataForm.content" maxlength=100
               placeholder="设置评分项"></Input>
      </FormItem>
    </Form>
    <div slot="footer">
      <Button @click="save">保存</Button>
    </div>
  </Modal>
</template>

<script>
import { addContentEvaluation } from '@/api/management.js'

export default {
  data () {
    return {
      visible: false,
      dataForm: {
        content: '',
      },
    }
  },
  components: {

  },
  methods: {
    init (row) {
      this.visible = true
    },
    // 表单提交
    save () {
      let data = { content: this.dataForm.content }
      addContentEvaluation(data).then(res => {
        if (res.data == 'success') {
          this.visible = false
          this.$emit('refreshDataList')
        }
      })
    }
  }
}
</script>
<style lang="scss" scoped>
</style>